package com.jcfy.project.module.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jcfy.framework.aspectj.lang.annotation.Excel;
import com.jcfy.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 订单对象 t_order
 *
 * @author jiangfeng
 * @date 2020-08-05
 */
public class TOrder extends BaseEntity {
    private static final long serialVersionUID=1L;

    /** 主键id */
    private Long orderId;

    /** 用户id */
    @Excel(name = "用户id" )
    private Long userId;

    /** 订单流水号 */
    @Excel(name = "订单流水号" )
    private String traceNo;

    /** 业务类型(1：商品订购) */
    @Excel(name = "业务类型(1：商品订购)" )
    private Integer businessType;

    /** 商品总费用 */
    @Excel(name = "商品总费用" )
    private BigDecimal goodsPrice;

    /** 配送费用 */
    @Excel(name = "配送费用" )
    private BigDecimal freightPrice;

    /** 优惠券减免 */
    @Excel(name = "优惠券减免" )
    private BigDecimal couponPrice;

    /** 用户积分减免 */
    @Excel(name = "用户积分减免" )
    private BigDecimal integralPrice;

    /** 团购优惠价减免 */
    @Excel(name = "团购优惠价减免" )
    private BigDecimal grouponPrice;

    /** 订单金额(单位：元)， = goods_price + freight_price - coupon_price */
    @Excel(name = "订单金额(单位：元)， = goods_price + freight_price - coupon_price" )
    private BigDecimal orderPrice;

    /** 实付金额(单位：元)， = order_price - integral_price */
    @Excel(name = "实付金额(单位：元)， = order_price - integral_price" )
    private BigDecimal amount;

    /** 支付方式(1：微信小程序) */
    @Excel(name = "支付方式(1：微信小程序)" )
    private Integer payType;

    /** 支付账户 */
    @Excel(name = "支付账户" )
    private String payAccount;

    /** 支付单号 */
    @Excel(name = "支付单号" )
    private String payNo;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "支付时间" , width = 30, dateFormat = "yyyy-MM-dd" )
    private Date payTime;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名" )
    private String consigneeName;

    /** 收货人手机号 */
    @Excel(name = "收货人手机号" )
    private String consigneeMobile;

    /** 省份 */
    @Excel(name = "省份" )
    private String consigneeProvince;

    /** 城市 */
    @Excel(name = "城市" )
    private String consigneeCity;

    /** 收货地址所在区 */
    @Excel(name = "收货地址所在区" )
    private String consigneeArea;

    /** 详细地址 */
    @Excel(name = "详细地址" )
    private String consigneeAddress;

    /** 业务状态(1：待支付、2：待发货、3：待收货、4：已收货、5：已完成、6：已取消、7：申请退款、8：退款中、9：退款成功、10：退款失败、11：未支付自动取消，不在客户端显示)，初始1 */
    @Excel(name = "业务状态(1：待支付、2：待发货、3：待收货、4：已收货、5：已完成、6：已取消、7：申请退款、8：退款中、9：退款成功、10：退款失败、11：未支付自动取消，不在客户端显示)，初始1" )
    private Integer businessStatus;

    /** 买家留言 */
    @Excel(name = "买家留言" )
    private String message;

    /** 状态 */
    @Excel(name = "状态" )
    private Integer status;

    /** 物流公司信息(物流公司编码) */
    @Excel(name = "物流公司信息(物流公司编码)" )
    private String logisticsCompany;

    /** 物流单号 */
    @Excel(name = "物流单号" )
    private String logisticsNumber;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "发货时间" , width = 30, dateFormat = "yyyy-MM-dd" )
    private Date shipTime;

    /** 配送方式 */
    @Excel(name = "配送方式" )
    private Integer freightType;

    /** 推广用户 */
    @Excel(name = "推广用户" )
    private Long shareUserId;

    /** 提货码 */
    @Excel(name = "提货码" )
    private String fetchCode;

    /** 销售信息(销售团长手机号，姓名) */
    @Excel(name = "销售信息(销售团长手机号，姓名)" )
    private String saleInfo;

    /** 提货信息(提货店长手机号，姓名) */
    @Excel(name = "提货信息(提货店长手机号，姓名)" )
    private String takeInfo;

    /** 提货门店地址 */
    @Excel(name = "提货门店地址" )
    private String takeAddress;

    /** 是否已读(0：否、1：是),默认0 */
    @Excel(name = "是否已读(0：否、1：是),默认0" )
    private Integer isRead;

    /** 退款来源，当business_status为9时不为空（0-默认 1-商品退款） */
    @Excel(name = "退款来源，当business_status为9时不为空" , readConverterExp = "0=-默认,1=-商品退款" )
    private Integer source;

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderId() {
        return orderId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }
    public void setTraceNo(String traceNo) {
        this.traceNo = traceNo;
    }

    public String getTraceNo() {
        return traceNo;
    }
    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public Integer getBusinessType() {
        return businessType;
    }
    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }
    public void setFreightPrice(BigDecimal freightPrice) {
        this.freightPrice = freightPrice;
    }

    public BigDecimal getFreightPrice() {
        return freightPrice;
    }
    public void setCouponPrice(BigDecimal couponPrice) {
        this.couponPrice = couponPrice;
    }

    public BigDecimal getCouponPrice() {
        return couponPrice;
    }
    public void setIntegralPrice(BigDecimal integralPrice) {
        this.integralPrice = integralPrice;
    }

    public BigDecimal getIntegralPrice() {
        return integralPrice;
    }
    public void setGrouponPrice(BigDecimal grouponPrice) {
        this.grouponPrice = grouponPrice;
    }

    public BigDecimal getGrouponPrice() {
        return grouponPrice;
    }
    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAmount() {
        return amount;
    }
    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayType() {
        return payType;
    }
    public void setPayAccount(String payAccount) {
        this.payAccount = payAccount;
    }

    public String getPayAccount() {
        return payAccount;
    }
    public void setPayNo(String payNo) {
        this.payNo = payNo;
    }

    public String getPayNo() {
        return payNo;
    }
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getPayTime() {
        return payTime;
    }
    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneeName() {
        return consigneeName;
    }
    public void setConsigneeMobile(String consigneeMobile) {
        this.consigneeMobile = consigneeMobile;
    }

    public String getConsigneeMobile() {
        return consigneeMobile;
    }
    public void setConsigneeProvince(String consigneeProvince) {
        this.consigneeProvince = consigneeProvince;
    }

    public String getConsigneeProvince() {
        return consigneeProvince;
    }
    public void setConsigneeCity(String consigneeCity) {
        this.consigneeCity = consigneeCity;
    }

    public String getConsigneeCity() {
        return consigneeCity;
    }
    public void setConsigneeArea(String consigneeArea) {
        this.consigneeArea = consigneeArea;
    }

    public String getConsigneeArea() {
        return consigneeArea;
    }
    public void setConsigneeAddress(String consigneeAddress) {
        this.consigneeAddress = consigneeAddress;
    }

    public String getConsigneeAddress() {
        return consigneeAddress;
    }
    public void setBusinessStatus(Integer businessStatus) {
        this.businessStatus = businessStatus;
    }

    public Integer getBusinessStatus() {
        return businessStatus;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }
    public void setLogisticsCompany(String logisticsCompany) {
        this.logisticsCompany = logisticsCompany;
    }

    public String getLogisticsCompany() {
        return logisticsCompany;
    }
    public void setLogisticsNumber(String logisticsNumber) {
        this.logisticsNumber = logisticsNumber;
    }

    public String getLogisticsNumber() {
        return logisticsNumber;
    }
    public void setShipTime(Date shipTime) {
        this.shipTime = shipTime;
    }

    public Date getShipTime() {
        return shipTime;
    }
    public void setFreightType(Integer freightType) {
        this.freightType = freightType;
    }

    public Integer getFreightType() {
        return freightType;
    }
    public void setShareUserId(Long shareUserId) {
        this.shareUserId = shareUserId;
    }

    public Long getShareUserId() {
        return shareUserId;
    }
    public void setFetchCode(String fetchCode) {
        this.fetchCode = fetchCode;
    }

    public String getFetchCode() {
        return fetchCode;
    }
    public void setSaleInfo(String saleInfo) {
        this.saleInfo = saleInfo;
    }

    public String getSaleInfo() {
        return saleInfo;
    }
    public void setTakeInfo(String takeInfo) {
        this.takeInfo = takeInfo;
    }

    public String getTakeInfo() {
        return takeInfo;
    }
    public void setTakeAddress(String takeAddress) {
        this.takeAddress = takeAddress;
    }

    public String getTakeAddress() {
        return takeAddress;
    }
    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public Integer getIsRead() {
        return isRead;
    }
    public void setSource(Integer source) {
        this.source = source;
    }

    public Integer getSource() {
        return source;
    }

    @Override
    public String toString(){
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId" ,getOrderId())
            .append("userId" ,getUserId())
            .append("traceNo" ,getTraceNo())
            .append("businessType" ,getBusinessType())
            .append("goodsPrice" ,getGoodsPrice())
            .append("freightPrice" ,getFreightPrice())
            .append("couponPrice" ,getCouponPrice())
            .append("integralPrice" ,getIntegralPrice())
            .append("grouponPrice" ,getGrouponPrice())
            .append("orderPrice" ,getOrderPrice())
            .append("amount" ,getAmount())
            .append("payType" ,getPayType())
            .append("payAccount" ,getPayAccount())
            .append("payNo" ,getPayNo())
            .append("payTime" ,getPayTime())
            .append("consigneeName" ,getConsigneeName())
            .append("consigneeMobile" ,getConsigneeMobile())
            .append("consigneeProvince" ,getConsigneeProvince())
            .append("consigneeCity" ,getConsigneeCity())
            .append("consigneeArea" ,getConsigneeArea())
            .append("consigneeAddress" ,getConsigneeAddress())
            .append("businessStatus" ,getBusinessStatus())
            .append("message" ,getMessage())
            .append("remark" ,getRemark())
            .append("createTime" ,getCreateTime())
            .append("updateTime" ,getUpdateTime())
            .append("status" ,getStatus())
            .append("logisticsCompany" ,getLogisticsCompany())
            .append("logisticsNumber" ,getLogisticsNumber())
            .append("shipTime" ,getShipTime())
            .append("freightType" ,getFreightType())
            .append("shareUserId" ,getShareUserId())
            .append("fetchCode" ,getFetchCode())
            .append("saleInfo" ,getSaleInfo())
            .append("takeInfo" ,getTakeInfo())
            .append("takeAddress" ,getTakeAddress())
            .append("isRead" ,getIsRead())
            .append("source" ,getSource())
            .toString();
    }
}
